package com.itic.appbase.framework.type;

public enum PreIncomeType {
	//预估收益类型（PI001：佣金，PI002：提成）
	Commission("PI001","佣金"),Bonus("PI002","提成"),changeActual("PI003","转为累计"),tradeColse("PI004","交易关闭");
	private String type;
	private String name;
	PreIncomeType(String type ,String name) {
		this.type = type;
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static PreIncomeType getType(String type) {
		PreIncomeType preIncomeType = null;
		switch (type) {
		case "PI001":
			preIncomeType = PreIncomeType.Commission;
			break;
		case "PI002":
			preIncomeType = preIncomeType.Bonus;
			break;
		case "PI003":
			preIncomeType = preIncomeType.changeActual;
			break;
		case "PI004":
			preIncomeType = preIncomeType.tradeColse;
			break;
		default:
			break;
		}
		return preIncomeType;
	}
}
